using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_FileTool_VirtualFileInfo_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.FileTool.VirtualFileInfo);

            field = type.GetField("key", flag);
            app.RegisterCLRFieldGetter(field, get_key_0);
            app.RegisterCLRFieldSetter(field, set_key_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_key_0, AssignFromStack_key_0);
            field = type.GetField("name", flag);
            app.RegisterCLRFieldGetter(field, get_name_1);
            app.RegisterCLRFieldSetter(field, set_name_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_name_1, AssignFromStack_name_1);
            field = type.GetField("position", flag);
            app.RegisterCLRFieldGetter(field, get_position_2);
            app.RegisterCLRFieldSetter(field, set_position_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_position_2, AssignFromStack_position_2);
            field = type.GetField("dataOffset", flag);
            app.RegisterCLRFieldGetter(field, get_dataOffset_3);
            app.RegisterCLRFieldSetter(field, set_dataOffset_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_dataOffset_3, AssignFromStack_dataOffset_3);
            field = type.GetField("keyLen", flag);
            app.RegisterCLRFieldGetter(field, get_keyLen_4);
            app.RegisterCLRFieldSetter(field, set_keyLen_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_keyLen_4, AssignFromStack_keyLen_4);
            field = type.GetField("dataLen", flag);
            app.RegisterCLRFieldGetter(field, get_dataLen_5);
            app.RegisterCLRFieldSetter(field, set_dataLen_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_dataLen_5, AssignFromStack_dataLen_5);
            field = type.GetField("realPath", flag);
            app.RegisterCLRFieldGetter(field, get_realPath_6);
            app.RegisterCLRFieldSetter(field, set_realPath_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_realPath_6, AssignFromStack_realPath_6);
            field = type.GetField("allLen", flag);
            app.RegisterCLRFieldGetter(field, get_allLen_7);
            app.RegisterCLRFieldSetter(field, set_allLen_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_allLen_7, AssignFromStack_allLen_7);
            field = type.GetField("End", flag);
            app.RegisterCLRFieldGetter(field, get_End_8);
            app.RegisterCLRFieldSetter(field, set_End_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_End_8, AssignFromStack_End_8);
            field = type.GetField("subset", flag);
            app.RegisterCLRFieldGetter(field, get_subset_9);
            app.RegisterCLRFieldSetter(field, set_subset_9);
            app.RegisterCLRFieldBinding(field, CopyToStack_subset_9, AssignFromStack_subset_9);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.FileTool.VirtualFileInfo());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.FileTool.VirtualFileInfo[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_key_0(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).key;
        }

        static StackObject* CopyToStack_key_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).key;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_key_0(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).key = (System.String)v;
        }

        static StackObject* AssignFromStack_key_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @key = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.FileTool.VirtualFileInfo)o).key = @key;
            return ptr_of_this_method;
        }

        static object get_name_1(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).name;
        }

        static StackObject* CopyToStack_name_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).name;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_name_1(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).name = (System.String)v;
        }

        static StackObject* AssignFromStack_name_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.FileTool.VirtualFileInfo)o).name = @name;
            return ptr_of_this_method;
        }

        static object get_position_2(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).position;
        }

        static StackObject* CopyToStack_position_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).position;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_position_2(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).position = (System.Int32)v;
        }

        static StackObject* AssignFromStack_position_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @position = ptr_of_this_method->Value;
            ((huqiang.FileTool.VirtualFileInfo)o).position = @position;
            return ptr_of_this_method;
        }

        static object get_dataOffset_3(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).dataOffset;
        }

        static StackObject* CopyToStack_dataOffset_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).dataOffset;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_dataOffset_3(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).dataOffset = (System.Int32)v;
        }

        static StackObject* AssignFromStack_dataOffset_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @dataOffset = ptr_of_this_method->Value;
            ((huqiang.FileTool.VirtualFileInfo)o).dataOffset = @dataOffset;
            return ptr_of_this_method;
        }

        static object get_keyLen_4(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).keyLen;
        }

        static StackObject* CopyToStack_keyLen_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).keyLen;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_keyLen_4(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).keyLen = (System.Int32)v;
        }

        static StackObject* AssignFromStack_keyLen_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @keyLen = ptr_of_this_method->Value;
            ((huqiang.FileTool.VirtualFileInfo)o).keyLen = @keyLen;
            return ptr_of_this_method;
        }

        static object get_dataLen_5(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).dataLen;
        }

        static StackObject* CopyToStack_dataLen_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).dataLen;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_dataLen_5(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).dataLen = (System.Int32)v;
        }

        static StackObject* AssignFromStack_dataLen_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @dataLen = ptr_of_this_method->Value;
            ((huqiang.FileTool.VirtualFileInfo)o).dataLen = @dataLen;
            return ptr_of_this_method;
        }

        static object get_realPath_6(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).realPath;
        }

        static StackObject* CopyToStack_realPath_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).realPath;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_realPath_6(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).realPath = (System.String)v;
        }

        static StackObject* AssignFromStack_realPath_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @realPath = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.FileTool.VirtualFileInfo)o).realPath = @realPath;
            return ptr_of_this_method;
        }

        static object get_allLen_7(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).allLen;
        }

        static StackObject* CopyToStack_allLen_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).allLen;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_allLen_7(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).allLen = (System.Int32)v;
        }

        static StackObject* AssignFromStack_allLen_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @allLen = ptr_of_this_method->Value;
            ((huqiang.FileTool.VirtualFileInfo)o).allLen = @allLen;
            return ptr_of_this_method;
        }

        static object get_End_8(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).End;
        }

        static StackObject* CopyToStack_End_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).End;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_End_8(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).End = (System.Int32)v;
        }

        static StackObject* AssignFromStack_End_8(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @End = ptr_of_this_method->Value;
            ((huqiang.FileTool.VirtualFileInfo)o).End = @End;
            return ptr_of_this_method;
        }

        static object get_subset_9(ref object o)
        {
            return ((huqiang.FileTool.VirtualFileInfo)o).subset;
        }

        static StackObject* CopyToStack_subset_9(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.FileTool.VirtualFileInfo)o).subset;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_subset_9(ref object o, object v)
        {
            ((huqiang.FileTool.VirtualFileInfo)o).subset = (System.Collections.Generic.List<huqiang.FileTool.VirtualFileInfo>)v;
        }

        static StackObject* AssignFromStack_subset_9(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Collections.Generic.List<huqiang.FileTool.VirtualFileInfo> @subset = (System.Collections.Generic.List<huqiang.FileTool.VirtualFileInfo>)typeof(System.Collections.Generic.List<huqiang.FileTool.VirtualFileInfo>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.FileTool.VirtualFileInfo)o).subset = @subset;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.FileTool.VirtualFileInfo();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
